The present invention relates to digital computers for processing high level languages and, more particularly, to a combined Arithmetic Stack Processor (ASP) for use in the building of high level language computers comprising, a microprogrammable Central Processing Unit (CPU) having a plurality of code input pin for sequentially loading microcode to be executed by the CPU, a plurality of input/output pins for acting as a port for external data transfers to and from the CPU, a plurality of RAM pins for reading from and writing to an external stack random access memory (RAM); a Stack Pointer Unit (SPU) having a plurality of RAM address pins for designating addresses of the external stack RAM to be written into and read from by the CPU and a plurality of stack pointer registers for containing stack pointers to locations in the external stack RAM; delay logic internally passing microcode to the SPU for thus causing the SPU to calculate from the microcode a sequence of next addresses in the external stack RAM one clock cycle before the CPU needs to read or write the data corresponding to each the next address; and, a clock buffer for receiving a clock signal at an input thereof and for transmitting the clock signal to the CPU, the SPU and the delay logic.
The typical system designer, in trying to solve a particular problem, uses prior knowledge of algorithm complexities to find the "best" algorithm. He then translates this into a high level language (HLL). When performance is critical, however, a standard general purpose computer may be too inefficient. In those cases, the system designer can either try to write part of the code in machine language or try to find a computer that can run the HLL program faster. It is with the latter approach that this invention is concerned.
The problem can be understood better with a brief look at the evolution of computers and their relationship to high level languages. An early prior art computer is shown in simplified block diagram form in FIG. 1 where it is generally indicated as 10. The computer 10 included an arithmetic and logic unit (ALU) 12 interfacing with volatile memory 14 containing the programs and data employed to cause the computer 10 to do useful work. The programs which were executed comprised a sequence of machine language instructions. As depicted in the drawing of FIG. 2, the ALU 12 contained a number of operating registers 16 and a next instruction register 18 which pointed to the location in the memory 14 of the next machine language instruction to be executed. The instructions themselves were basic manipulation and decision instructions whereby, for example, an operating register could be loaded with the contents of a location in the data portion of the memory 14. Programming in machine language meant programming in binary numbers. Such a process was difficult and prone to the introduction of errors (i.e. "bugs") into the program's instruction sequence.
Because of these problems, interpretive loaders and assemblers were developed very early in the evolution of computers and their support features. These programs allowed new programs to be created in symbolic alphanumeric representations of the machine language instructions. Instead of working in binary numbers, the programmer could use English language type statements which were then translated by the support software into the binary number sequences representing the machine language instructions loaded into and executed by the computer itself. While this was an improvement, the programming was still on a machine instruction capability level. For example, to see if a particular value was equal to 4, the location in memory containing the value had to be loaded into a register by one instruction, a 4 subtracted therefrom by a second instruction, and then the next instruction register modified by a decision instruction (i.e. a conditional branch in the instruction sequence) based on whether the contents of the register was equal to zero following the subtraction. Moreover, the problem of errors and bugs in the programming process remained.
To resolve the errors situation to a great extent and make programming easier overall, so-called "high level languages" (HLLs) were developed. The first, such as FORTRAN (for FORmula TRANslator), were primarily directed at performing complex mathematical processes since that was the primary use of computers in their infancy. Thus, as symbolized by the simplified diagram of FIG. 3, a programmer could input a HLL statement 20 such as B=C+D+E+F into the compiler 22 and the compiler would generate the necessary sequence of machine language instructions 24 to load a register with the contents of the memory location assigned to the symbolic label "C", add the contents of location "D", then "E", then "F", and finally store the results in location "B".
As can be appreciated, the early compilers for the high level languages had to be individually written for each new computer. This was because each new computer had different operating characteristics and machine language instructions which it executed. Such rewriting of compilers was a major undertaking consuming much time and consuming large sums of development funds as well. With the introduction of more compilers for the various specialized uses for which computers were being employed, the compiler problem got out of hand. The same was true for other types of large support programs. Thus, the concept of "portable" programs was introduced--including portable compilers. In this approach, the compiler performs its functions through generalized instructions which are then further implemented by a translation into the specific machine language instructions for the computer in question. A new translator is easily implementable, relatively speaking.
In addition to the changes in the approach to constructing compilers to achieve portability of the coding to new computers, the computers themselves went through an architectural revolution. The totally unique mainframe computers implemented in vacuum tubes and then discrete transistors gave way to minicomputers and then microcomputers implemented on a single printed circuit board as a number of integrated circuits that could, literally, fit on the desk top. In microcomputers, the instructions performed by the computer are not hardwired into the logic of the arithmetic and control unit 12 as in the early computers discussed briefly above. They are defined by microinstructions contained in a read only memory. The performance of the computer can be redefined by simply redefining the microcode. While this makes for flexibility, it also adds layers of time access to the execution sequence; that is, everything in the computer is done under the control of the clock frequency and, while the clock frequencies have become higher and higher in order to increase computer throughput, there is still a price to pay in time for the flexibility that this newer approach to computer designs provided. All this is to say that when a high level language is implemented for portability by writing it in a high level language which, in turn, is compiled by a compiler written in a high level language operating on a computer designed for general flexibility, the resultant object code that embodies the ultimate high level language statements of a programmer programming applications programs may perform in a less than optimum manner.
In the early days of high level languages, programmers familiar with machine language coding would do a first pass at a major programming task using a high level language to produce virtually bug-free programs in a short time. Critical paths that needed to execute as quickly as possible were then reprogrammed in machine language. The result was a bug-free system with a good level of performance capability in the least amount of time. Unfortunately, this approach is generally no longer employed as the number of programmers capable in machine language is practically nil. As a result, the approach is usually one of "what you see is what you get." The final coding running in a computer as produced from high level language inputs is, therefore, generally far less then optimum.
A computer engineer trying to help a system designer to solve his problems, is faced with a myriad of choices. The easier and cheaper solution is to use one of the standard microprocessors, such as the Motorola 68020. If this does not meet the speed requirements, however, he must accept the harder and more expensive task of designing from more basic elements; such as the Advanced Micro Devices 29300 bit-sliced elements, standard chips, or design an applications-specific computer chip.
The inventors' motivation herein was to provide the art with a basic hardware element that would simplify the design of a wide variety of language-directed computer architectures; that is, computers intended to operate from high level language inputs. With such a basic element, the designer could follow an applications-driven approach; starting with a language of his choice and then writing the program. Only then would he need to be concerned with profiling the program to optimize his compiler and decide whether any hardware modification is desirable.